package bmptest.bmp.config;

import bmptest.bmp.intercepter.LoginInterceptor;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
 * @author lyq
 * @date 2021/9/6 9:38
 * 拦截除登录页面外路径
 */
@SpringBootConfiguration
public class WebConfigur  implements WebMvcConfigurer {

    @Bean
    public LoginInterceptor getLoginIntercepter() {
        return new LoginInterceptor();
    }

   /* @Override
    public void addInterceptors(InterceptorRegistry registry){
        registry.addInterceptor(getLoginIntercepter()).addPathPatterns("/**").excludePathPatterns("/index.html");
    }*/

}
